plotServiceDemand <- function(outputFilepath)
{
  cpudata <- read.table(file="~/data.dat", skip=1)
  idleStats <- cpudata[, ncol(cpudata)]
  useStats <- 100 - idleStats
  
  X11()
  png(outputFilepath, width=800, height=300)

  plot(useStats, main="CPU Use Over Time", xlab="Time in Seconds", ylab="% CPU Use", pch=18, col="red", type="o", lty=1)
  dev.off()
}

plotServiceDemand("~/eaa-labwork/images/Wk7_Lab_a_graph.png")
